import request from "@/utils/request";

const api = '/post-loan-domain/'

/**
 * 提醒
 * **/
// 添加提醒结果记录
export async function addTodayExpireResult(params) {
    return await request.post(api + 'todayExpire/addTodayExpireResult', params)
}

//待办列表
export async function todayExpireAgencyList(params) {
    return await request.post(api + 'todayExpire/agencyList', params)
}

//已办列表
export async function todayExpireCompletedList(params) {
    return await request.post(api + 'todayExpire/completedList', params)
}

//到期提醒全部列表
export async function todayExpireAllList(params) {
    return await request.post(api + 'todayExpire/list', params)
}

//到期提醒导出
export async function todayExpireExport(params) {
    return await request.post(api + 'todayExpire/listExport', params)
}

//所搜分配调单
export async function searchTransfer(params) {
    return await request.post(api + 'todayExpire/searchTransfer', params)
}

//所选分配调单
export async function selectTransfer(params) {
    return await request.post(api + 'todayExpire/selectTransfer', params)
}

//提醒结果列表
export async function todayExpireResultList(params) {
    return await request.post(api + 'todayExpire/todayExpireResultList', params)
}

//调单列表
export async function transferList(params) {
    return await request.post(api + 'todayExpire/transferList', params)
}

/**
 * 贷后客群管理
 * **/
//添加客群管理
export async function addGuestGroup(params) {
    return await request.post(api + 'guestGroup/add', params)
}

//绑定员工
export async function bindAdminGuest(params) {
    return await request.post(api + 'guestGroup/bindAdminGuest', params)
}

/**
 * 客群绑定的员工列表
 * @param params adminRole 1超级管理员，2租户，3信审经理，4信审专员，5财务，6催收经理,7催收专员,8提醒经理,9提醒专员
 */
export async function guestGroupBindList(params) {
    return await request.post(api + 'guestGroup/bindList', params)
}

//删除员工绑定
export async function cancelBindAdminGuest(params) {
    return await request.post(api + 'guestGroup/cancelBindAdminGuest', params)
}

//删除客群
export async function guestGroupDelete(params) {
    return await request.get(api + 'guestGroup/delete', {params})
}

/**
 * 客群管理列表
 * @param params type : 1 催收  0 提醒
 */
export async function guestGroupList(params) {
    return await request.post(api + 'guestGroup/list', params)
}

//查询员工列表
export async function systemUserList(params) {
    return await request.post(api + 'guestGroup/systemUserList', params)
}

//编辑客群
export async function guestGroupUpdate(params) {
    return await request.post(api + 'guestGroup/update', params)
}

// 调单获取客群已绑定员工
export async function guestBindList(params) {
    return await request.post(api + 'guestGroup/guestBindList', params)
}

/**
 * 报表
 * **/
//客群提醒报表
export async function guestDateList(params) {
    return await request.post(api + 'todayExpireData/guestDateList', params)
}

//提醒报表
export async function todayExpirePgeList(params) {
    return await request.post(api + 'todayExpireData/todayExpirePgeList', params)
}

/**
 * 催收
 * **/

//上报黑名单
export async function addBlackList(params) {
    return await request.get(api + 'collection/addBlackList', {params})
}

//添加催收记录
export async function addCollectionResultRecord(params) {
    return await request.post(api + 'collection/addCollectionResultRecord', params)
}

//待办催收列表
export async function collectionAgencyList(params) {
    return await request.post(api + 'collection/agencyList', params)
}

//已办催收列表
export async function collectionCompletedList(params) {
    return await request.post(api + 'collection/completedList', params)
}

//根据订单编号获取详情
export async function getByLoanRecordId(params) {
    return await request.post(api + 'collection/getByLoanRecordId', params)
}

//获取短信模板
export async function getSmsTemp(params) {
    return await request.get(api + 'collection/getSmsTemp', {params})
}

//催收全部列表
export async function fetchCollectionList(params) {
    return await request.post(api + 'collection/list', params)
}

//催收导出
export async function collectionExport(params) {
    return await request.post(api + 'collection/listExport', params)
}

//催收列表总计
export async function collectionTotalAmount(params) {
    return await request.post(api + 'collection/listTatolAmount', params)
}

//打款明细
export async function paymentDetail(params) {
    return await request.get(api + 'collection/paymentDetail', {params})
}

//减免记录详情
export async function recordDetail(params) {
    return await request.post(api + 'collection/recordDetail', params)
}

// 查询app页面访问记录
export async function selectLoanLaterAction(params) {
    return await request.get(api + 'collection/selectLoanLaterAction', {params})
}

//催收记录列表
export async function resultList(params) {
    return await request.post(api + 'collection/resultList', params)
}

//所搜分配调单
export async function searchCollectionTransfer(params) {
    return await request.post(api + 'collection/searchTransfer', params)
}

//所选分配调单
export async function selectCollectionTransfer(params) {
    return await request.post(api + 'collection/selectTransfer', params)
}

//发送短信
export async function sendSms(params) {
    return await request.post(api + 'collection/sendSms', params)
}

//调单列表
export async function collectionTransferList(params) {
    return await request.post(api + 'collection/transferList', params)
}

/**
 * 提醒报表
 * **/
// 客群提醒报表
export async function todayExpireDataGuestDateList(params) {
    return await request.post(api + 'todayExpireData/guestDateList', params)
}

// 提醒报表
export async function todayExpireDataExpirePgeList(params) {
    return await request.post(api + 'todayExpireData/todayExpirePgeList', params)
}

// 提醒人效报表
export async function remindListReport(params) {
    return await request.post(api + 'todayExpireData/postRemindList', params)
}

// 提醒人效报表导出
export async function remindReportExport(params) {
    return await request.post(api + 'todayExpireData/postRemindListExport', params)
}

/**
 * 催收报表
 * **/
// 催收报表
export async function collectionDataGuestDateList(params) {
    return await request.post(api + 'collectionData/collectionPgeList', params)
}

// 客群催收报表
export async function collectionDataCollectionPgeList(params) {
    return await request.post(api + 'collectionData/guestDateList', params)
}

// 催收人效报表
export async function personnelEffectList(params) {
    return await request.get(api + 'collectionData/personnelEffectList', {params})
}

// 催收人效报表合计
export async function personnelEffectTotal(params) {
    return await request.get(api + 'collectionData/personnelEffectTotal', {params})
}

// 催收人效报表导出
export async function personnelEffectExport(params) {
    return await request.get(api + 'collectionData/personnelEffectExport', {params})
}

/**
 * 贷后分单实时板块
 */
export async function orderSplitDataList(params) {
    return await request.post(api + 'collectionData/orderSplitDataList', params)
}

// 订单业绩
export async function orderSplitOrderData(params) {
    return await request.post(api + 'staffData/orderList', params)
}

// 金额业绩
export async function orderSplitAmountData(params) {
    return await request.post(api + 'staffData/amountList', params)
}

/**
 * 提醒分单实时板块
 */
export async function remindRealTimeReportList(params) {
    return await request.post(api + 'todayExpireData/postRealTimeList', params)
}

/**
 * 提醒分单周报业绩
 */
export async function remindRealTimeWeekList(params) {
    return await request.post(api + 'todayExpireData/postRealTimeWeekList', params)
}

export async function remindRealTimeWeekTotal(params) {
    return await request.post(api + 'todayExpireData/postRealTimeWeekTotal', params)
}

/**
 * 催收分时段还款列表
 */
export async function collectionTimeShare(params) {
    return await request.post(api + 'dayparting/collectionList', params)
}

/**
 * 提醒分时段还款列表
 */
export async function remindTimeShare(params) {
    return await request.post(api + 'dayparting/remindList', params)
}

/**
 *  提醒角色首页
 */
// 获取我的排名
export async function fetchHomeMyRanking(params) {
    return await request.post(api + 'todayExpireHomeData/myRank', params)
}

// 获取今日总览
export async function fetchHomeOverview(params) {
    return await request.post(api + 'todayExpireHomeData/todayOverview', params)
}

// 获取工作质量
export async function fetchHomeQuality(params) {
    return await request.post(api + 'todayExpireHomeData/workQuality', params)
}

// 获取团队今日工作质量
export async function fetchHomeTeamToDayQuality(params) {
    return await request.post(api + 'todayExpireHomeData/teamRankToday', params)
}

// 获取团队上周工作质量
export async function fetchHomeTeamLastWeekQuality(params) {
    return await request.post(api + 'todayExpireHomeData/teamRankLastWeek', params)
}

// 获取团队整体排名
export async function fetchHomeTeamWholeRank(params) {
    return await request.post(api + 'todayExpireHomeData/teamWholeRank', params)
}

// 上周整体综合率/复借率
export async function lastWeekComprehensive(params) {
    return await request.post(api + 'todayExpireHomeData/lastWeekComprehensive', params)
}

// 曲线图
export async function fetchHomeChartsData(params) {
    return await request.post(api + 'todayExpireHomeData/diagram', params)
}

/**
 * 催收角色首页
 */

// 获取今日总览
export async function fetchCollectionHomeOverview(params) {
    return await request.post(api + 'collectionHomeData/todayOverview', params)
}

// 获取个人工作质量
export async function fetchCollectionWorkQuality(params) {
    return await request.post(api + 'collectionHomeData/workQuality', params)
}

// 获取曲线图
export async function fetchCollectionCharts(params) {
    return await request.post(api + 'collectionHomeData/diagram', params)
}

// 获取个人上周整体结清率/金额催回率
export async function fetchCollectionLastWeekComprehensive(params) {
    return await request.post(api + 'collectionHomeData/lastWeekComprehensive', params)
}

// 获取个人排名
export async function fetchCollectionMyRank(params) {
    return await request.post(api + 'collectionHomeData/myRank', params)
}

// 获取团队上周质量排行榜
export async function fetchCollectionTeamRankLastWeek(params) {
    return await request.post(api + 'collectionHomeData/teamRankLastWeek', params)
}

// 获取团队今日质量排行榜
export async function fetchCollectionTeamRankToday(params) {
    return await request.post(api + 'collectionHomeData/teamRankToday', params)
}

// 获取团队整体排名
export async function fetchCollectionTeamWholeRank(params) {
    return await request.post(api + 'collectionHomeData/teamWholeRank', params)
}

/**
 * 催收软电话记录
 */
// 添加催收软电话记录
export async function addCollectionCallPhoneRecord(params) {
    return await request.post(api + 'softPhone/add', params)
}

// 获取催收实操报表列表
export async function fetchCollectionReportList(params) {
    return await request.post(api + 'softPhone/list', params)
}

/**
 * 提醒软电话记录
 */
// 添加提醒软电话记录
export async function addRemindPhoneRecord(params) {
    return await request.post(api + 'softPhoneRemind/add', params)
}

// 获取提醒实操报表列表
export async function fetchRemindReportList(params) {
    return await request.post(api + 'softPhoneRemind/list', params)
}
